<template>
  <div>
    <FilterTable ref="basetable" :fetchapi="fetchApi" :columns="columns" :params="fetchParams" :datakey="'rows'" :onColumnsChange="columns => (this.columns = columns)"></FilterTable>
    <div
      :style="{
        position: 'absolute',
        left: 0,
        bottom: 0,
        right: 0,
        zIndex: 9999,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'right'
      }"
    >
      <el-button @click="closeDialog">返 回</el-button>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      fetchApi: () => {},
      columns: this.createdTable(),
      fetchParams: {}
    };
  },
  methods: {
    createdTable() {
      return [
        {
          title: '序号',
          render: props => {
            return <span>{props.row.index + 1}</span>;
          }
        },
        {
          title: '经销商',
          dataIndex: 'BRAND_NAME',
          sorter: true,
          filter: true,
          render: props => {
            return <span>{props.row.BRAND_NAME}</span>;
          }
        },
        {
          title: '车牌号',
          dataIndex: 'BRAND_NAME',
          sorter: true,
          filter: true,
          render: props => {
            return <span>{props.row.BRAND_NAME}</span>;
          }
        },
        {
          title: '车主',
          dataIndex: 'BRAND_NAME',
          sorter: true,
          filter: true,
          render: props => {
            return <span>{props.row.BRAND_NAME}</span>;
          }
        },
        {
          title: '品牌',
          dataIndex: 'BRAND_NAME',
          sorter: true,
          filter: true,
          render: props => {
            return <span>{props.row.BRAND_NAME}</span>;
          }
        },
        {
          title: '车系',
          dataIndex: 'BRAND_NAME',
          sorter: true,
          filter: true,
          render: props => {
            return <span>{props.row.BRAND_NAME}</span>;
          }
        },
        {
          title: '车型',
          dataIndex: 'BRAND_NAME',
          sorter: true,
          filter: true,
          render: props => {
            return <span>{props.row.BRAND_NAME}</span>;
          }
        },
        {
          title: '车主性质',
          dataIndex: 'BRAND_NAME',
          sorter: true,
          filter: true,
          render: props => {
            return <span>{props.row.BRAND_NAME}</span>;
          }
        }
      ];
    },
    closeDialog(val) {
      this.$emit('close', false);
    }
  }
};
</script>
